package com.gupao.edu.study.factory;

import com.gupao.edu.study.factory.bean.EBill;
import com.gupao.edu.study.factory.bean.PBill;

/*
 * @Author: guqy
 * @Description:
 * @Date 11:42 2018/3/9
 * @param null
 * @return
 */
public class FactorySimple {

    public Object getObject(String objName){
        if("ebms".equals(objName)){
            return new EBill();
        }else
        if("bms".equals(objName)){
            return new PBill();
        }else{
            throw new RuntimeException("未获取类型");
        }
    }
}
